package com.itheima.demo03;

//卖票案例
public class TicketDemo {
    public static void main(String[] args) {
        Ticket ticket = new Ticket();
        Thread thread1 = new Thread(ticket);
        Thread thread2 = new Thread(ticket);
        Thread thread3 = new Thread(ticket);
        thread1.setName("1号窗口");
        thread2.setName("2号窗口");
        thread3.setName("3号窗口");
        thread1.start();
        thread2.start();
        thread3.start();
    }
}
